package com.zy.openchat.core.model.user;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.SerializedName;

public class UserType implements Parcelable {

    @SerializedName(value = "@type")
    public String type;

    public UserType(String type) {
        this.type = type;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.type);
    }

    public void readFromParcel(Parcel source) {
        this.type = source.readString();
    }

    public UserType() {
    }

    protected UserType(Parcel in) {
        this.type = in.readString();
    }

    public static final Parcelable.Creator<UserType> CREATOR = new Parcelable.Creator<UserType>() {
        @Override
        public UserType createFromParcel(Parcel source) {
            return new UserType(source);
        }

        @Override
        public UserType[] newArray(int size) {
            return new UserType[size];
        }
    };
}
